package com.example.choupaiapp.main.activity.mine;

import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.example.choupaiapp.R;
import com.example.choupaiapp.common.ui.activity.CommonActivity;
import com.example.choupaiapp.common.util.Utils;

import butterknife.BindView;
import butterknife.OnClick;

/**
 * Created by ASUS on 2019/12/30.
 */

public class AboutActivity extends CommonActivity {

    @BindView(R.id.version)
    TextView version;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_about);
    }

    @Override
    protected void initView() {
        setTitle("关于我们");
        version.setText("丑拍" + getAppVersionName());

    }

    @Override
    protected void initData() {

    }

    @OnClick({R.id.legal_notice, R.id.use_help, R.id.secret, R.id.pledge})
    public void onViewClicked(View view) {
        if (Utils.isDoubleClick()) {
            return;
        }
        switch (view.getId()) {
            case R.id.legal_notice:
                Bundle bundle = new Bundle();
                bundle.putString("flag", "1");
                startActivity(AboutRichTextActivity.class, bundle);
                break;
            case R.id.use_help:
                Bundle bundle1 = new Bundle();
                bundle1.putString("flag", "2");
                startActivity(AboutRichTextActivity.class, bundle1);
                break;
            case R.id.secret:
                Bundle bundle2 = new Bundle();
                bundle2.putString("flag", "3");
                startActivity(AboutRichTextActivity.class, bundle2);
                break;
            case R.id.pledge:
                Bundle bundle3 = new Bundle();
                bundle3.putString("flag", "4");
                startActivity(AboutRichTextActivity.class, bundle3);
                break;
        }
    }
}
